package shangjun; /**
 * Created by sahngjun on 2017/4/8.
 */

import java.lang.*;
import java.util.*;


public class Day01 {
    public static int n = 0;//接收字符串长度
    public static String str;//接收输入的字符串
    public static Set set = new TreeSet();//利用set集合的不重复性，来保存所有被发现小偷的地址，要是有两个警察发现了同一个小偷的情况就可以只保存一次


    public static void main(String[] args) {
        set.clear();
        Scanner sc = new Scanner(System.in);
        n = Integer.parseInt(sc.next());
        str = sc.next();

        for (int j = 0; j < str.length(); j++) {
            int a = str.charAt(j);
            if ('0' < a && a <= '9') {
                int start = j - (str.charAt(j) - '0') > 0 ? j - (str.charAt(j) - '0') : 0;
                for (int police = start; police < j + (str.charAt(j) - '0') && police < str.length(); police++) {
                    if (str.charAt(police) == 'X') {
                        set.add(police);
                    }
                }
            }
        }

        System.out.println(set.size());
        Iterator iterator = set.iterator();
        while (iterator.hasNext()) {
            System.out.println(iterator.next());
        }
    }
}
